raar.register
Class RARegister

java.lang.Object
  extended by raar.register.RARegister
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RAFetchRegister, RASetRegister

public class RARegister
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.util.Vector initialObjectVector
           
protected  java.util.Vector nameVector
           
protected  java.util.Vector objectVector
           
 
Constructor Summary
RARegister()
           
 
Method Summary
 boolean accepts(RADataType dt, java.lang.String name)
          Returns true if this datatype with this name would be accepted.
 void add(java.lang.String name, RADataType dt)
           
 void clearRegister()
          Clear register data -- keep names, delete all the data though.
 RADataType get(java.lang.String name)
          Returns the object (= RADataType) with this name
 java.util.Vector getNameVector()
          Get the names of the keys in this register.
 java.util.Vector getObjectVector()
          Get the content (Vector of RADataTypes) of this register.
 int getType(java.lang.String name)
           
 boolean nameExists(java.lang.String name)
           
 void set(java.lang.String name, RADataType dt)
           
 void set(java.lang.String name, RADataType dt, boolean forceRegisterInitial)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nameVector

protected java.util.Vector nameVector

objectVector

protected java.util.Vector objectVector

initialObjectVector

protected java.util.Vector initialObjectVector
Constructor Detail

RARegister

public RARegister()
Method Detail

get

public RADataType get(java.lang.String name)
               throws RAException
Returns the object (= RADataType) with this name

Parameters:
name - the name
Returns:
object the object
Throws:
RAException

clearRegister

public void clearRegister()
Clear register data -- keep names, delete all the data though.


nameExists

public boolean nameExists(java.lang.String name)
                   throws RAException
Throws:
RAException

add

public void add(java.lang.String name,
                RADataType dt)
         throws RAException
Throws:
RAException

getType

public int getType(java.lang.String name)
            throws RAException
Throws:
RAException

set

public void set(java.lang.String name,
                RADataType dt)
         throws RAException
Throws:
RAException

set

public void set(java.lang.String name,
                RADataType dt,
                boolean forceRegisterInitial)
         throws RAException
Throws:
RAException

accepts

public boolean accepts(RADataType dt,
                       java.lang.String name)
                throws RAException
Returns true if this datatype with this name would be accepted. Null is always accepted if the key (name) exists.

Throws:
RAException

getNameVector

public java.util.Vector getNameVector()
Get the names of the keys in this register. This returns a Vector of Strings.


getObjectVector

public java.util.Vector getObjectVector()
Get the content (Vector of RADataTypes) of this register. You can use it for example to determine what datatypes this register is storing.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object